package TAIC.Classifier;
import java.io.*;
import java.util.*; 

public class ClassifierConfigure {
	Hashtable < String , String > map = new Hashtable < String , String >() ;
	
	public ClassifierConfigure ( String configFile ) {
		try {
			Scanner scanner = new Scanner ( new File ( configFile )) ; 
			while ( scanner.hasNext() ) {
				map.put( scanner.next().toLowerCase() , scanner.next().trim() ) ;
				if ( scanner.hasNextLine() ) scanner.nextLine() ;
			}
		}
		catch ( Exception e ) {
			System.out.println ( "No config file " + configFile + " exists") ;
			System.exit( 0 ) ; 
		}
	}
	
	public String get ( String str ) {
		return map.get( str) ; 
	}
}
